﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Terraria.ModLoader
{
	// Token: 0x02000193 RID: 403
	public class GlobalProjectile
	{
		// Token: 0x1700012F RID: 303
		// (get) Token: 0x06001069 RID: 4201 RVA: 0x0000EB2B File Offset: 0x0000CD2B
		// (set) Token: 0x0600106A RID: 4202 RVA: 0x0000EB33 File Offset: 0x0000CD33
		public Mod mod { get; internal set; }

		// Token: 0x17000130 RID: 304
		// (get) Token: 0x0600106B RID: 4203 RVA: 0x0000EB3C File Offset: 0x0000CD3C
		// (set) Token: 0x0600106C RID: 4204 RVA: 0x0000EB44 File Offset: 0x0000CD44
		public string Name { get; internal set; }

		// Token: 0x0600106D RID: 4205 RVA: 0x0000EB4D File Offset: 0x0000CD4D
		public virtual bool Autoload(ref string name)
		{
			return this.mod.Properties.Autoload;
		}

		// Token: 0x17000131 RID: 305
		// (get) Token: 0x0600106E RID: 4206 RVA: 0x0000ADF8 File Offset: 0x00008FF8
		public virtual bool InstancePerEntity
		{
			get
			{
				return false;
			}
		}

		// Token: 0x0600106F RID: 4207 RVA: 0x0000EB5F File Offset: 0x0000CD5F
		public GlobalProjectile Instance(Projectile projectile)
		{
			if (!this.InstancePerEntity)
			{
				return this;
			}
			return projectile.globalProjectiles[this.instanceIndex];
		}

		// Token: 0x17000132 RID: 306
		// (get) Token: 0x06001070 RID: 4208 RVA: 0x0000ADF8 File Offset: 0x00008FF8
		public virtual bool CloneNewInstances
		{
			get
			{
				return false;
			}
		}

		// Token: 0x06001071 RID: 4209 RVA: 0x0000EB78 File Offset: 0x0000CD78
		public virtual GlobalProjectile Clone()
		{
			return (GlobalProjectile)base.MemberwiseClone();
		}

		// Token: 0x06001072 RID: 4210 RVA: 0x0040508C File Offset: 0x0040328C
		public virtual GlobalProjectile NewInstance(Projectile projectile)
		{
			if (this.CloneNewInstances)
			{
				return this.Clone();
			}
			GlobalProjectile globalProjectile = (GlobalProjectile)Activator.CreateInstance(base.GetType());
			globalProjectile.mod = this.mod;
			globalProjectile.Name = this.Name;
			globalProjectile.index = this.index;
			globalProjectile.instanceIndex = this.instanceIndex;
			return globalProjectile;
		}

		// Token: 0x06001073 RID: 4211 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void SetDefaults(Projectile projectile)
		{
		}

		// Token: 0x06001074 RID: 4212 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool PreAI(Projectile projectile)
		{
			return true;
		}

		// Token: 0x06001075 RID: 4213 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void AI(Projectile projectile)
		{
		}

		// Token: 0x06001076 RID: 4214 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void PostAI(Projectile projectile)
		{
		}

		// Token: 0x06001077 RID: 4215 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool ShouldUpdatePosition(Projectile projectile)
		{
			return true;
		}

		// Token: 0x06001078 RID: 4216 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool TileCollideStyle(Projectile projectile, ref int width, ref int height, ref bool fallThrough)
		{
			return true;
		}

		// Token: 0x06001079 RID: 4217 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool OnTileCollide(Projectile projectile, Vector2 oldVelocity)
		{
			return true;
		}

		// Token: 0x0600107A RID: 4218 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool PreKill(Projectile projectile, int timeLeft)
		{
			return true;
		}

		// Token: 0x0600107B RID: 4219 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void Kill(Projectile projectile, int timeLeft)
		{
		}

		// Token: 0x0600107C RID: 4220 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? CanCutTiles(Projectile projectile)
		{
			return null;
		}

		// Token: 0x0600107D RID: 4221 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void CutTiles(Projectile projectile)
		{
		}

		// Token: 0x0600107E RID: 4222 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool CanDamage(Projectile projectile)
		{
			return true;
		}

		// Token: 0x0600107F RID: 4223 RVA: 0x0000ADF8 File Offset: 0x00008FF8
		public virtual bool MinionContactDamage(Projectile projectile)
		{
			return false;
		}

		// Token: 0x06001080 RID: 4224 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyDamageHitbox(Projectile projectile, ref Rectangle hitbox)
		{
		}

		// Token: 0x06001081 RID: 4225 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? CanHitNPC(Projectile projectile, NPC target)
		{
			return null;
		}

		// Token: 0x06001082 RID: 4226 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyHitNPC(Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
		{
		}

		// Token: 0x06001083 RID: 4227 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHitNPC(Projectile projectile, NPC target, int damage, float knockback, bool crit)
		{
		}

		// Token: 0x06001084 RID: 4228 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool CanHitPvp(Projectile projectile, Player target)
		{
			return true;
		}

		// Token: 0x06001085 RID: 4229 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyHitPvp(Projectile projectile, Player target, ref int damage, ref bool crit)
		{
		}

		// Token: 0x06001086 RID: 4230 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHitPvp(Projectile projectile, Player target, int damage, bool crit)
		{
		}

		// Token: 0x06001087 RID: 4231 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool CanHitPlayer(Projectile projectile, Player target)
		{
			return true;
		}

		// Token: 0x06001088 RID: 4232 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
		{
		}

		// Token: 0x06001089 RID: 4233 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHitPlayer(Projectile projectile, Player target, int damage, bool crit)
		{
		}

		// Token: 0x0600108A RID: 4234 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? Colliding(Projectile projectile, Rectangle projHitbox, Rectangle targetHitbox)
		{
			return null;
		}

		// Token: 0x0600108B RID: 4235 RVA: 0x00404FFC File Offset: 0x004031FC
		public virtual Color? GetAlpha(Projectile projectile, Color lightColor)
		{
			return null;
		}

		// Token: 0x0600108C RID: 4236 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool PreDrawExtras(Projectile projectile, SpriteBatch spriteBatch)
		{
			return true;
		}

		// Token: 0x0600108D RID: 4237 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool PreDraw(Projectile projectile, SpriteBatch spriteBatch, Color lightColor)
		{
			return true;
		}

		// Token: 0x0600108E RID: 4238 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void PostDraw(Projectile projectile, SpriteBatch spriteBatch, Color lightColor)
		{
		}

		// Token: 0x0600108F RID: 4239 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void DrawBehind(Projectile projectile, int index, List<int> drawCacheProjsBehindNPCsAndTiles, List<int> drawCacheProjsBehindNPCs, List<int> drawCacheProjsBehindProjectiles, List<int> drawCacheProjsOverWiresUI)
		{
		}

		// Token: 0x06001090 RID: 4240 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? CanUseGrapple(int type, Player player)
		{
			return null;
		}

		// Token: 0x06001091 RID: 4241 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? SingleGrappleHook(int type, Player player)
		{
			return null;
		}

		// Token: 0x06001092 RID: 4242 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void UseGrapple(Player player, ref int type)
		{
		}

		// Token: 0x06001093 RID: 4243 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void NumGrappleHooks(Projectile projectile, Player player, ref int numHooks)
		{
		}

		// Token: 0x06001094 RID: 4244 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void GrappleRetreatSpeed(Projectile projectile, Player player, ref float speed)
		{
		}

		// Token: 0x06001095 RID: 4245 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void GrapplePullSpeed(Projectile projectile, Player player, ref float speed)
		{
		}

		// Token: 0x04001356 RID: 4950
		internal int index;

		// Token: 0x04001357 RID: 4951
		internal int instanceIndex;
	}
}
